package com.yjzx.util.binlog.core.entiry;

import com.github.shyiko.mysql.binlog.event.EventType;
import lombok.Getter;

/**
 * @author guozhi
 * @description BinLog
 * @since 2025/6/25
 */
@Getter
public class BinLog implements BinLogData{
    /**
     * 库名
     */
    final String database;
    /**
     * 表名
     */
    final String table;
    /**
     * 事件类型
     */
    final EventType eventType;
    /**
     * 时间戳
     */
    final long timestamp;
    /**
     * 事件id
     */
    final long serverId;

    public BinLog(String database, String table, EventType eventType, long timestamp, long serverId) {
        this.database = database;
        this.table = table;
        this.eventType = eventType;
        this.timestamp = timestamp;
        this.serverId = serverId;
    }
}
